package com.zero.spring.boot.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Package: com.zero.spring.boot.web.controller
 * Description： TODO
 * Author: HaloWang
 * Date: Created in 2018/5/29 17:02
 * Company: 公司
 * Copyright: Copyright (c) 2018
 * Version: 0.0.1
 * Modified By: HaloWang
 */

@Controller
public class IndexController {
    @RequestMapping("/index")
    public String hello(Model model, @RequestParam(value="name", required=false, defaultValue="World") String name) {
        model.addAttribute("name", name);
        return "ind";
    }

    @RequestMapping("/index2")
    public String index2(Model model, @RequestParam(value="name", required=false, defaultValue="World") String name) {

        return "ind2";
    }
}
